<%@ page import="com.webamc.common.enums.Fields" %>
<%@ page import="com.webamc.common.enums.Params" %>
<%@ page import="com.webamc.model.Order" %>
<%@ page import="com.webamc.util.CommonUtil" %>
<%@ page import="java.util.List" %>
<%
    List<Order> list = (List<Order>) request.getAttribute(Params.BEAN);
    if (list == null || list.size() == 0) {
%><p class="header-divsmall">No order, <a href="order.html?action=beforeCreate">click here</a> to create.</p>
<%
        return;
    }
%>

<jsp:include page="msgs.jsp"/>

<thead>
    <tr>
        <td>OrderId</td>
        <td>Product Name</td>
        <td>Product Serial</td>
        <td>CustomerId</td>
        <td>Create Date</td>
        <td>Status</td>
        <td>Description</td>
        <td>Remarks</td>
    </tr>
</thead>
<tbody>
    <%
        for (Order order : list) {
    %>
    <tr>
        <td><%=order.getOrderId()%>
        </td>
        <td><%=order.getProductName()%>
        </td>
        <td><%=order.getProductSerial()%>
        </td>
        <td><%=order.getCustomerId()%>
        </td>
        <td><%=CommonUtil.getDateString(order.getCreateDate())%>
        </td>
        <td><%=order.getStatus()%>
        </td>
        <td><%=order.getDescription()%>
        </td>
        <td><%=order.getRemarks()%>
        </td>
    </tr>
    <%}%>
</tbody>
